<template>
    <div id="div44" style="width: 100%;height:25vh;"></div>
</template>
<script setup lang="ts">
import {onMounted} from 'vue'
import * as echarts from 'echarts';
import 'echarts-gl';

onMounted(()=>{
 var myChart = echarts.init(document.getElementById('div44'));
  window.addEventListener('resize', function() {
    myChart.resize();
  });
type EChartsOption = echarts.EChartsOption;


var ROOT_PATH = 'https://echarts.apache.org/examples';



var chartDom = document.getElementById('div44')!;
var myChart = echarts.init(chartDom);
var option: EChartsOption;
option = {
//   title: {
//     text: 'Stacked Area Chart'
//   },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'cross',
      label: {
        backgroundColor: '#6a7985'
      }
    }
  },
  legend: {
    // data: ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine']
  },
//   toolbox: {
//     feature: {
//       saveAsImage: {}
//     }
//   },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '2%',
    containLabel: true
  },
  xAxis: [
    {
      type: 'category',
      boundaryGap: false,
      data: ['2', '6', '10', '14', '18', '22']
    }
  ],
  yAxis: [
    {
      type: 'value'
    }
  ],
  series: [
    {
    //   name: 'Email',
      type: 'line',
      stack: 'Total',
      areaStyle: {},
      emphasis: {
        focus: 'series'
      },
      data: [120, 132, 101, 134, 90, 230, 210]
    }
  ]
};


option && myChart.setOption(option);


})

</script>